-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable 'Upload' button when no file is chosen. #11983
Disable 'Upload' button when no file is chosen. #11983
Conversation
@miq-bot add_labels automate, ui, bug |
@eclarizio Please review |
$('#upload-datastore-import').prop('disabled', true); | ||
} | ||
} | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change is fine, but we should probably move it so that we don't have a bunch of logic sitting in the view. I'd propose to move this whole block into app/assets/javascripts/import.js
, and into the ImportSetup
object, and then just call something like ImportSetup.setUpUploadDatastoreImportButton()
or something with a better name than I can come up with right now 😛 .
This way, we can also add specs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eclarizio I moved the JS like you said. I also let your name of the function. ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the function name to setUpUploadImportButton, because of making rest of the upload buttons to use this function.
Cool, looks good now, but can we add a spec for the code in the |
@miq-bot add_label wip |
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
Making them to use the setUpUploadImportButton function.
@miq-bot remove_label wip |
Checked commits pkomanek/manageiq@a3ebcdd~...1858835 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1 |
LGTM 👍 |
…te_import-export_page Disable 'Upload' button when no file is chosen. (cherry picked from commit 4ae1916) https://bugzilla.redhat.com/show_bug.cgi?id=1383174
Euwe Backport details: $ git log -1
commit b0efb4921f11d30df48d0f1b731fe5ecac09f7a2
Author: Greg McCullough <gmccullo@redhat.com>
Date: Fri Oct 21 15:46:20 2016 -0400
Merge pull request #11983 from pkomanek/spinner_rotate_fix_for_automate_import-export_page
Disable 'Upload' button when no file is chosen.
(cherry picked from commit 4ae1916e478646187420ec06d1feb84a97c56cc6)
https://bugzilla.redhat.com/show_bug.cgi?id=1383174 |
@simaishi Need Euwe BZ for https://bugzilla.redhat.com/show_bug.cgi?id=1383174 |
Fixing the bug bellow by disabling the 'Upload' button in automate import/export page when no file is chosen.
Screenshots
before:
after:
Links
https://bugzilla.redhat.com/show_bug.cgi?id=1383174